<form class="form-horizontal form-validate form-modal" method="post" action="{:url('choose')}">
    <div class="modal-dialog" style="width: 700px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">商品选择</h4>
            </div>
            <div class="modal-body">
                <section class="panel panel-default ">
                    <div class="table-responsive " id="list_box">
                        <table class="table table-bordered  table-hover ">
                            <tbody>
                            {volist name="data.list" id="vo" key="index"}
                            <tr>
                                <td><input type="checkbox" name="choose_ids[]" value="{$vo.goods_id}"></td>
                                <td>
                                    <div  style="width:500px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
                                        <img src="{$vo.goods_thumb}" style="width: 80px;height: 60px">
                                        <span>{$vo.goods_name}</span>
                                    </div>
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                        {empty name="data.list"}
                        <table width="100%" >
                            <tr><td height="300" colspan="8" align="center" valign="middle" >没有相关数据！</td></tr>
                        </table>
                        {/empty}
                    </div>
                </section>
            </div>
            <div class="modal-footer">
                <div class="col-md-6  text-left text-center-xs fl ">
                    <ul class="pagination  m-t-sm m-b-none">
                        <li {$data.page<=1?'style="display:none;"':''} >
                        <a href="{:url('choose'),array('page'=>$data.page-1)}">
                            上一页
                        </a>
                        </li>
                        <li {$data.page<=2?'style="display:none;"':''}>
                        <a href="{:url('choose'),array('page'=>$data.page-2)}">
                            {$data.page-2}
                        </a>
                        </li>
                        <li {$data.page<=1?'style="display:none;"':''}>
                        <a href="{:url('choose'),array('page'=>$data.page-1)}">
                            {$data.page-1}
                        </a>
                        </li>
                        <li class="active">
                            <a href="javascript:;">
                                {$data.page}
                            </a>
                        </li>
                        <li {$data.page>=$data.page_count?'style="display:none;"':''}>
                            <a href="{:url('choose'),array('page'=>$data.page+1)}">
                                {$data.page+1}
                            </a>
                        </li>
                        <li {$data.page>=$data.page_count-1?'style="display:none;"':''}>
                            <a href="{:url('choose'),array('page'=>$data.page+2)}">
                                {$data.page+2}
                            </a>
                        </li>
                        <li {$data.page>=$data.page_count?'style="display:none;"':''}>
                            <a href="{:url('choose'),array('page'=>$data.page+1)}">
                                下一页
                            </a>
                        </li>
                    </ul>
                    <ul class="pagination pagination-sm m-t-sm m-b-none" data-pages-total="{$data.page_count}" data-page-current="{$data.page}"></ul>
                </div>
                <div  class="col-md-6  text-right text-center-xs fr" style="margin-top: 10px;">
                    <button type="submit" class="btn btn-primary" data-loading-text="保存中..." disabled>确认选择</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>
</form>
<script>
    function nums_nums(type) {
        if (type==2) {
            $("input[name='task_nums']").show();
        } else {
            $("input[name='task_nums']").hide();
        }
    }
</script>